Dynomotion

Group: DynoMotion Message: 4 From: Dan Zimmermann Date: 12/18/2005
Subject: KMotion multiple board programming assistance
To anyone that can help,

I am currently setting up an application that will use (2) KMotion
motor control boards. My current knowledge ends with G-code
programming and servo motor applications i.e. CNC lathes and Milling
machines.

In this application I will be using (8) stepper motors but I will be
only runnng 1-axis at a time.

If anyone could offer a programming example that uses multiple
boards and stepper motors it would be helpful for me to see any
differences in designating linear movement for a stepper motor.

I am currently writing a line by line requirement of the sequence
that I need to program to give myself an outline of the motions
without the numerical values for each move.



The following is a list of the equipment that I am using;

-Toshiba M200 Tablet PC running Windows XP Professional
-KMotion Software
-(2) KMotion Motor Control Boards

#1 Motor- (X-axis)
Model # 5709L-03, Frame Size-23, 0.9 Step angle,
http://www.linengineering.com/site/products/5709.html

#2 Motor- (Y-axis)
Model # 5709L-03, Frame Size-23, 0.9 Step angle,
http://www.linengineering.com/site/products/5709.html

#3 Motor- (Z-axis)
Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
1.8 degree step angle, .00125 travel per step
http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw

#4 Motor- (A-axis)
Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
1.8 degree step angle, .00125 travel per step
http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw

#5 Motor- (B-axis)
Model # 4018M-05, 1.8 degree step angle
http://www.linengineering.com/site/products/4018.html

#6 Motor- (C-axis)
Model # 4018M-05, 1.8 degree step angle
http://www.linengineering.com/site/products/4018.html

#7 Motor- (D-axis)
Model # 211-18-02, 1.8 degree step angle
http://www.linengineering.com/site/products/211.html

#8 Motor- (E-axis)
Model # 4018M-05, 1.8 degree step angle
http://www.linengineering.com/site/products/4018.html

Thank you in advance for any assistance that you may offer and
please don't hesitate to ask for additional information that you may
require.

Cheers
Dan


Dan Zimmermann, President
GBOGH Research
gboghmobile@...
Group: DynoMotion Message: 5 From: TK Date: 12/18/2005
Subject: Re: KMotion multiple board programming assistance

Hi Dan,

 

Do you have the motors and power supplies connected, axes configured as steppers, and are you able to move them using the KMotion Executive program's Console Screen?

 

For info on how to connect motors see:

http://www.dynomotion.com/Help/Schematics/Connectors.htm

 

For info on how to configure the axes for steppers see:

http://www.dynomotion.com/Help/ConfigurationScreen/ConfigurationScreen.htm

 

For info on how to move a motor from the KMotion Console Screen see:

http://www.dynomotion.com/Help/ConsoleScreen/ConsoleScreen.htm

 

Try typing a command like "MoveRel0=50.0" (Move Relative axis 0 50 cycles) to see if Motor #1 rotates.

 

 

 

Assuming you are able to move motors with the KMotion Executive, there are several choices on how to control the boards. 

 

They are:

 

#1 - Write Microsoft Windows program to issue commands to the board using either Visual Studio C++ or Visual Basic.

 

#2 - Write a C program that is loaded (and possibly flashed) into the KMotion board.  This program may run in "stand alone" mode where a host PC isn't even connected.

 

#3 - Write a GCode motion program and load it into the KMotion Executive program and execute it.

 

 

It's not clear what your application is, or how you want the system to be operated, but usually the most flexible technique is #1, especially for using multiple boards.  Basically the program issues the same commands that are available on the console screen.  This does require a means of programming under MS Windows.  DynoMotion provides canned examples for Microsoft Visual Studio 6.0.  If you look into the directory where the KMotion Software was installed there is a directory called:

 

<IntstallDirectory>\PC VC Examples

 

Within that folder there is a project called SimpleConsole.  This is a Simple Windows console application that connects to the board, configures one axis as a stepper, commands the axis to move, reads status to determine when the motion is complete, and sends a message that will be displayed on the KMotion Executive Console Screen if it is running.  The entire C++ program is pasted below.  To talk to the other axes (on the same board) it is basically a matter of duplicating code and changing the axis (sometimes referred as channel) number.  The example assumes that there is only one board connected to the system and takes advantage of the fact that a single board in a system can be referred to as board 0.  When you connect multiple boards to a system you should change the board number to the USB identifier for where the board is connected.  For more info on multiple boards see:

 

http://www.dynomotion.com/Help/MultipleBoards.htm

 

 

I hope this helps.  Let us know if you have further questions.

 

 

Tom Kerekes

Dynomotion, Inc.

 

 

 

 

// SimpleConsole.cpp

 

#include "stdafx.h"

#include "stdlib.h"

#include "..\..\KMotionDll\KMotionDll.h"  // KMOtion DLL Header

 

CKMotionDLL KM;                // one instance of the interface class

 

void MyError();

 

 

int main(int argc, char* argv[])

{

       int board=0;

       char response[MAX_LINE];

 

       // Setup Axis for a simple stepper motor

 

       if (KM.WriteLine(board, "DisableAxis1=0"))      MyError(); // Set board 0, Axis 1 to OFF while changing parameters

       if (KM.WriteLine(board, "Zero1=0"))             MyError(); // Zero position board 0, Axis 1

       if (KM.WriteLine(board, "StepperAmplitude1=80"))MyError(); // Set nominal Sine wave amplitude to 80/256 of Motor supply voltage

       if (KM.WriteLine(board, "Vel1=100"))            MyError(); // Set Max Velocity to 100 cycles/sec (4 full steps/sec = 1 cycle)

       if (KM.WriteLine(board, "Accel1=50"))           MyError(); // Set Max Acceleration to 50 cycles/sec2

       if (KM.WriteLine(board, "Jerk1=2000"))          MyError(); // Set Max Jerk to 2000 cycles/sec3

       if (KM.WriteLine(board, "Lead1=10"))            MyError(); // Set Inductance Lead compensation to 10 * dV/dt

       if (KM.WriteLine(board, "OutputMode1=1"))       MyError(); // Set board 0, Axis 1 to MICROSTEP_MODE (see KMotionDef.h)

       if (KM.WriteLine(board, "EnableAxisDest1 0"))   MyError(); // Zero position board 0, Axis 1

       if (KM.WriteLine(board, "Echo Setup Complete")) MyError(); // Echo a string to console

 

 

       // move board 0, axis 1, 1000 counts relative

 

       if (KM.WriteLine(board, "MoveRel1=100"))  MyError();

 

       // loop until complete complete status = 1

 

       do

       {

              if (KM.WriteLineReadLine(board,"CheckDone1",response))

                     MyError();

       }

       while (response[0] != '1');

 

       if (KM.WriteLine(board, "Echo Move Complete")) MyError(); // Echo a string to console

 

       return 0;

}

 

// Display Error and terminate

 

void MyError()

{

       printf("Unable to communicate with KMotion board");

       exit(1);

}

 

 

 

 

 

 

 

 

 

Group: DynoMotion Message: 5658 From: carlcnc Date: 9/13/2012
Subject: Re: KMotion multiple board programming assistance
Bengt
if I may intrude,
IF you are running step and direction steppers OR step direction servo drives
check the "step on rising or falling setting"
and/or the pulse length or spacing.

the first will cause 1 missed step at each direction change, giving the results you have

the latter can cause 1 to several steps being executed before a direction change takes place

Carl




--- In DynoMotion@yahoogroups.com, "Dan Zimmermann" <gboghmobile@...> wrote:
>
> To anyone that can help,
>
> I am currently setting up an application that will use (2) KMotion
> motor control boards. My current knowledge ends with G-code
> programming and servo motor applications i.e. CNC lathes and Milling
> machines.
>
> In this application I will be using (8) stepper motors but I will be
> only runnng 1-axis at a time.
>
> If anyone could offer a programming example that uses multiple
> boards and stepper motors it would be helpful for me to see any
> differences in designating linear movement for a stepper motor.
>
> I am currently writing a line by line requirement of the sequence
> that I need to program to give myself an outline of the motions
> without the numerical values for each move.
>
>
>
> The following is a list of the equipment that I am using;
>
> -Toshiba M200 Tablet PC running Windows XP Professional
> -KMotion Software
> -(2) KMotion Motor Control Boards
>
> #1 Motor- (X-axis)
> Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> http://www.linengineering.com/site/products/5709.html
>
> #2 Motor- (Y-axis)
> Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> http://www.linengineering.com/site/products/5709.html
>
> #3 Motor- (Z-axis)
> Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> 1.8 degree step angle, .00125 travel per step
> http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
>
> #4 Motor- (A-axis)
> Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> 1.8 degree step angle, .00125 travel per step
> http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
>
> #5 Motor- (B-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> #6 Motor- (C-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> #7 Motor- (D-axis)
> Model # 211-18-02, 1.8 degree step angle
> http://www.linengineering.com/site/products/211.html
>
> #8 Motor- (E-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> Thank you in advance for any assistance that you may offer and
> please don't hesitate to ask for additional information that you may
> require.
>
> Cheers
> Dan
>
>
> Dan Zimmermann, President
> GBOGH Research
> gboghmobile@...
>
Group: DynoMotion Message: 5659 From: bsjoelund Date: 9/13/2012
Subject: Re: KMotion multiple board programming assistance
Hi Carl,

Analog servos here

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, "carlcnc" <carlcnc@...> wrote:
>
> Bengt
> if I may intrude,
> IF you are running step and direction steppers OR step direction servo drives
> check the "step on rising or falling setting"
> and/or the pulse length or spacing.
>
> the first will cause 1 missed step at each direction change, giving the results you have
>
> the latter can cause 1 to several steps being executed before a direction change takes place
>
> Carl
>
>
>
>
> --- In DynoMotion@yahoogroups.com, "Dan Zimmermann" <gboghmobile@> wrote:
> >
> > To anyone that can help,
> >
> > I am currently setting up an application that will use (2) KMotion
> > motor control boards. My current knowledge ends with G-code
> > programming and servo motor applications i.e. CNC lathes and Milling
> > machines.
> >
> > In this application I will be using (8) stepper motors but I will be
> > only runnng 1-axis at a time.
> >
> > If anyone could offer a programming example that uses multiple
> > boards and stepper motors it would be helpful for me to see any
> > differences in designating linear movement for a stepper motor.
> >
> > I am currently writing a line by line requirement of the sequence
> > that I need to program to give myself an outline of the motions
> > without the numerical values for each move.
> >
> >
> >
> > The following is a list of the equipment that I am using;
> >
> > -Toshiba M200 Tablet PC running Windows XP Professional
> > -KMotion Software
> > -(2) KMotion Motor Control Boards
> >
> > #1 Motor- (X-axis)
> > Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> > http://www.linengineering.com/site/products/5709.html
> >
> > #2 Motor- (Y-axis)
> > Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> > http://www.linengineering.com/site/products/5709.html
> >
> > #3 Motor- (Z-axis)
> > Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> > 1.8 degree step angle, .00125 travel per step
> > http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
> >
> > #4 Motor- (A-axis)
> > Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> > 1.8 degree step angle, .00125 travel per step
> > http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
> >
> > #5 Motor- (B-axis)
> > Model # 4018M-05, 1.8 degree step angle
> > http://www.linengineering.com/site/products/4018.html
> >
> > #6 Motor- (C-axis)
> > Model # 4018M-05, 1.8 degree step angle
> > http://www.linengineering.com/site/products/4018.html
> >
> > #7 Motor- (D-axis)
> > Model # 211-18-02, 1.8 degree step angle
> > http://www.linengineering.com/site/products/211.html
> >
> > #8 Motor- (E-axis)
> > Model # 4018M-05, 1.8 degree step angle
> > http://www.linengineering.com/site/products/4018.html
> >
> > Thank you in advance for any assistance that you may offer and
> > please don't hesitate to ask for additional information that you may
> > require.
> >
> > Cheers
> > Dan
> >
> >
> > Dan Zimmermann, President
> > GBOGH Research
> > gboghmobile@
> >
>
Group: DynoMotion Message: 5660 From: carlcnc Date: 9/13/2012
Subject: Re: KMotion multiple board programming assistance
there go all my theories lol


--- In DynoMotion@yahoogroups.com, "bsjoelund" <cnc@...> wrote:
>
> Hi Carl,
>
> Analog servos here
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, "carlcnc" <carlcnc@> wrote:
> >
> > Bengt
> > if I may intrude,
> > IF you are running step and direction steppers OR step direction servo drives
> > check the "step on rising or falling setting"
> > and/or the pulse length or spacing.
> >
> > the first will cause 1 missed step at each direction change, giving the results you have
> >
> > the latter can cause 1 to several steps being executed before a direction change takes place
> >
> > Carl
> >
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, "Dan Zimmermann" <gboghmobile@> wrote:
> > >
> > > To anyone that can help,
> > >
> > > I am currently setting up an application that will use (2) KMotion
> > > motor control boards. My current knowledge ends with G-code
> > > programming and servo motor applications i.e. CNC lathes and Milling
> > > machines.
> > >
> > > In this application I will be using (8) stepper motors but I will be
> > > only runnng 1-axis at a time.
> > >
> > > If anyone could offer a programming example that uses multiple
> > > boards and stepper motors it would be helpful for me to see any
> > > differences in designating linear movement for a stepper motor.
> > >
> > > I am currently writing a line by line requirement of the sequence
> > > that I need to program to give myself an outline of the motions
> > > without the numerical values for each move.
> > >
> > >
> > >
> > > The following is a list of the equipment that I am using;
> > >
> > > -Toshiba M200 Tablet PC running Windows XP Professional
> > > -KMotion Software
> > > -(2) KMotion Motor Control Boards
> > >
> > > #1 Motor- (X-axis)
> > > Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> > > http://www.linengineering.com/site/products/5709.html
> > >
> > > #2 Motor- (Y-axis)
> > > Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> > > http://www.linengineering.com/site/products/5709.html
> > >
> > > #3 Motor- (Z-axis)
> > > Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> > > 1.8 degree step angle, .00125 travel per step
> > > http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
> > >
> > > #4 Motor- (A-axis)
> > > Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> > > 1.8 degree step angle, .00125 travel per step
> > > http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
> > >
> > > #5 Motor- (B-axis)
> > > Model # 4018M-05, 1.8 degree step angle
> > > http://www.linengineering.com/site/products/4018.html
> > >
> > > #6 Motor- (C-axis)
> > > Model # 4018M-05, 1.8 degree step angle
> > > http://www.linengineering.com/site/products/4018.html
> > >
> > > #7 Motor- (D-axis)
> > > Model # 211-18-02, 1.8 degree step angle
> > > http://www.linengineering.com/site/products/211.html
> > >
> > > #8 Motor- (E-axis)
> > > Model # 4018M-05, 1.8 degree step angle
> > > http://www.linengineering.com/site/products/4018.html
> > >
> > > Thank you in advance for any assistance that you may offer and
> > > please don't hesitate to ask for additional information that you may
> > > require.
> > >
> > > Cheers
> > > Dan
> > >
> > >
> > > Dan Zimmermann, President
> > > GBOGH Research
> > > gboghmobile@
> > >
> >
>
Group: DynoMotion Message: 5738 From: carlcnc Date: 10/6/2012
Subject: Re: KMotion multiple board programming assistance
Dave
my best guess is you have a late version of Mach and they have changed the license file [so I heard] maybe that causes it to
not work with the plug in.
I've built several machines with kflop for guys who insist on running Mach, never had any issue
that said , I would never go back to Mach as Kmotion trajectory is
is WAY better ,
so my advice is to switch to Kmotion
Carl

--- In DynoMotion@yahoogroups.com, "Dan Zimmermann" <gboghmobile@...> wrote:
>
> To anyone that can help,
>
> I am currently setting up an application that will use (2) KMotion
> motor control boards. My current knowledge ends with G-code
> programming and servo motor applications i.e. CNC lathes and Milling
> machines.
>
> In this application I will be using (8) stepper motors but I will be
> only runnng 1-axis at a time.
>
> If anyone could offer a programming example that uses multiple
> boards and stepper motors it would be helpful for me to see any
> differences in designating linear movement for a stepper motor.
>
> I am currently writing a line by line requirement of the sequence
> that I need to program to give myself an outline of the motions
> without the numerical values for each move.
>
>
>
> The following is a list of the equipment that I am using;
>
> -Toshiba M200 Tablet PC running Windows XP Professional
> -KMotion Software
> -(2) KMotion Motor Control Boards
>
> #1 Motor- (X-axis)
> Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> http://www.linengineering.com/site/products/5709.html
>
> #2 Motor- (Y-axis)
> Model # 5709L-03, Frame Size-23, 0.9 Step angle,
> http://www.linengineering.com/site/products/5709.html
>
> #3 Motor- (Z-axis)
> Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> 1.8 degree step angle, .00125 travel per step
> http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
>
> #4 Motor- (A-axis)
> Hybrid Linear Actuator - Size 17 Captive shaft HSI 43000 Series
> 1.8 degree step angle, .00125 travel per step
> http://www.hsimotors.com/hybrid/Size17-Captive.htm#Draw
>
> #5 Motor- (B-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> #6 Motor- (C-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> #7 Motor- (D-axis)
> Model # 211-18-02, 1.8 degree step angle
> http://www.linengineering.com/site/products/211.html
>
> #8 Motor- (E-axis)
> Model # 4018M-05, 1.8 degree step angle
> http://www.linengineering.com/site/products/4018.html
>
> Thank you in advance for any assistance that you may offer and
> please don't hesitate to ask for additional information that you may
> require.
>
> Cheers
> Dan
>
>
> Dan Zimmermann, President
> GBOGH Research
> gboghmobile@...
>